import request from "@/common/Ask";
import type { Query } from "@/interface/Query";
import type { Page } from "@/interface/Page";
import type { Resolution } from "@/interface/Resolution";
import type {Select} from "@/interface/Select";


export async function listApi( data : Query ) {
    return request<Page<Resolution>>({
        url : "/resolution/list",
        method : "post",
        data : data
    });
}

export async function operatorApi( data : Resolution ) {
    return request({
        url : "/resolution/operator",
        method : "put",
        data : data
    });
}

export async function removeApi( ids : string[] ) {
    return request({
        url : "/resolution/remove",
        method : "delete",
        data : ids
    });
}


export async function getVoteInfoApi( id : string ) {
    return request<Select[]>({
        url : `/vote/infoCount/${id}`,
        method : "get",
    });
}

